package com.gt.quality.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gt.quality.base.BaseCommonService;
import com.gt.quality.system.entity.SysDictData;
import com.gt.quality.base.pojo.BaseLimitRequest;

import java.util.List;

/**
 * 字典数据表(SysDictData)表服务接口
 *
 * @author makejava
 * @since 2026-12-26 11:20:03
 */
public interface SysDictDataService extends BaseCommonService<SysDictData> {

    /**
     * Description:  分页查询
     *
     * @param limitRequest 分页查询参数
     * @author: makeJava
     * @return:com.baomidou.mybatisplus.core.metadata.IPage
     */
    @Override
    IPage<SysDictData> queryLimitPage(BaseLimitRequest<SysDictData> limitRequest);


    /**
     * Description:  根据字典类型查询字典数据
     * 有缓存操作
     *
     * @param dictType dictType
     * @return List<SysDictData>
     */
    public List<SysDictData> selectDictDataByType(String dictType);


    /**
     * Description:  新增
     *
     * @param sysDictData sysDictData
     * @return :Boolean
     * @author: makeJava
     */
    public Boolean saveDictData(SysDictData sysDictData);


    /**
     * Description:  新增或者修改
     *
     * @param sysDictData sysDictData
     * @return :Boolean
     * @author: makeJava
     */
    public Boolean insertOrUpdate(SysDictData sysDictData);


    /**
     * Description:  删除
     *
     * @param sysDictDataId sysDictDataId
     * @return :Boolean
     * @author: makeJava
     */
    public Boolean delDicData(SysDictData sysDictDataId);

    /**
     * Description:  删除
     *
     * @param sysDictDataId sysDictDataId
     * @return :Boolean
     * @author: makeJava
     */
    public Boolean delDicDataBatch(List<SysDictData> sysDictDataId);


    /**
     * Description:  清除缓存
     *
     * @param dictType dictType
     * @return :Boolean
     * @author: makeJava
     */
    public Boolean clearCacheByType(String dictType);


    /**
     * Description:  批量新增
     *
     * @param entityList entityList
     * @author: makeJava
     * @return:Integer
     */
    @Override
    Integer saveBatchByEasyBaseMapper(List<SysDictData> entityList);

    /**
     * Description:  根据字典类型查询字典数据
     *
     * @param dictType dictType
     * @return List<SysDictData>
     */
    List<SysDictData> getDictDataByDictType(String dictType);
}


